﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="using:Microsoft.PlayerFramework"
  >
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
            <SolidColorBrush Color="#66000000" x:Key="PanelBackgroundThemeBrush"/>
            <SolidColorBrush Color="#AA000000" x:Key="ControlPanelBackgroundThemeBrush"/>
            <SolidColorBrush Color="#FFFEFEFE" x:Key="SliderThumbBackgroundThemeBrush"/>
        </ResourceDictionary>
        <ResourceDictionary x:Key="Light">
            <SolidColorBrush Color="#66FFFFFF" x:Key="PanelBackgroundThemeBrush"/>
            <SolidColorBrush Color="#AAFFFFFF" x:Key="ControlPanelBackgroundThemeBrush"/>
            <SolidColorBrush Color="#FF010101" x:Key="SliderThumbBackgroundThemeBrush"/>
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <local:InteractiveViewModel x:Key="xamltypeinfo_InteractiveViewModel"/>

    <Style x:Key="MediaPlayerControlStyle" TargetType="local:MediaPlayerControl">
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
        <Setter Property="AutomationProperties.ItemType" Value="MediaPlayer Control"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MediaPlayerControl">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}">
                        <ContentControl x:Name="ContentPresenter" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MediaPlayerTextButtonStyle" TargetType="ButtonBase">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}" Background="#00000000">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" ContentTransitions="{TemplateBinding ContentTransitions}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MediaPlayerButtonStyle" TargetType="local:MediaPlayerButton">
        <Setter Property="Size" Value="26"/>
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Background" Value="{StaticResource ButtonBackgroundThemeBrush}" />
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}"/>
        <Setter Property="StrokeThickness" Value="{StaticResource ButtonBorderThemeThickness}"/>
        <Setter Property="AutomationProperties.ItemType" Value="MediaPlayer Button"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MediaPlayerButton">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}" Width="{TemplateBinding Size}" Height="{TemplateBinding Size}">
                        <Ellipse x:Name="Border" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding StrokeThickness}" Fill="{TemplateBinding Background}"/>
                        <ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" RenderTransformOrigin=".5,.5" RenderTransform="{TemplateBinding ContentTransform}"/>
                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="MediaPlayerToggleButtonStyle" TargetType="local:MediaPlayerToggleButton">
        <Setter Property="Size" Value="26"/>
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Background" Value="{StaticResource ButtonBackgroundThemeBrush}" />
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}" />
        <Setter Property="AutomationProperties.ItemType" Value="MediaPlayer Button"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MediaPlayerToggleButton">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}" Width="{TemplateBinding Size}" Height="{TemplateBinding Size}">
                        <Grid>
                            <Ellipse x:Name="Border" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding StrokeThickness}" Fill="{TemplateBinding Background}"/>
                            <ContentPresenter x:Name="Content" Content="{TemplateBinding Content}" ContentTransitions="{TemplateBinding ContentTransitions}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin=".5,.5" RenderTransform="{TemplateBinding ContentTransform}"/>
                        </Grid>
                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedBorderThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Indeterminate" />
                                <VisualState x:Name="IndeterminatePointerOver"/>
                                <VisualState x:Name="IndeterminatePressed"/>
                                <VisualState x:Name="IndeterminateDisabled"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:MediaPlayerButton" BasedOn="{StaticResource MediaPlayerButtonStyle}"/>

    <Style TargetType="local:MediaPlayerToggleButton" BasedOn="{StaticResource MediaPlayerToggleButtonStyle}"/>

    <Style TargetType="local:PlayPauseButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="SelectedContent" Value=""/>
        <Setter Property="UnselectedContent" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="PlayPauseButton"/>
    </Style>

    <Style TargetType="local:FullScreenButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="11"/>
        <Setter Property="SelectedContent" Value=""/>
        <Setter Property="UnselectedContent" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="FullScreenButton"/>
    </Style>

    <Style TargetType="local:MuteButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="SelectedContent" Value=""/>
        <Setter Property="UnselectedContent" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="MuteButton"/>
    </Style>

    <Style TargetType="local:SlowMotionButton" BasedOn="{StaticResource MediaPlayerToggleButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Padding" Value="3.5,0.5,0,0"/>
        <Setter Property="ContentTransform">
            <Setter.Value>
                <RotateTransform Angle="90"/>
            </Setter.Value>
        </Setter>
        <Setter Property="Content" Value="⏏"/>
        <Setter Property="AutomationProperties.AutomationId" Value="SlowMotionButton"/>
    </Style>

    <Style TargetType="local:PlayButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="PlayButton"/>
    </Style>

    <Style TargetType="local:PauseButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="PauseButton"/>
    </Style>

    <Style TargetType="local:CaptionSelectionButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="CaptionSelectionButton"/>
    </Style>

    <Style TargetType="local:GoLiveButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="SemiBold" />
        <Setter Property="Content" Value="LIVE"/>
        <Setter Property="AutomationProperties.AutomationId" Value="GoLiveButton"/>
    </Style>

    <Style TargetType="local:AudioSelectionButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="AudioSelectionButton"/>
    </Style>

    <Style TargetType="local:StopButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="StopButton"/>
    </Style>

    <Style TargetType="local:RewindButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Padding" Value="-1,-1,0,0"/>
        <Setter Property="Content" Value="⏪"/>
        <Setter Property="AutomationProperties.AutomationId" Value="RewindButton"/>
    </Style>

    <Style TargetType="local:FastForwardButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Padding" Value="0,-1,0,0"/>
        <Setter Property="Content" Value="⏩"/>
        <Setter Property="AutomationProperties.AutomationId" Value="FastForwardButton"/>
    </Style>

    <Style TargetType="local:ReplayButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="ContentTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="-1"/>
            </Setter.Value>
        </Setter>
        <Setter Property="AutomationProperties.AutomationId" Value="ReplayButton"/>
    </Style>

    <Style TargetType="local:SkipPreviousButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="SkipPreviousButton"/>
    </Style>

    <Style TargetType="local:SkipNextButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Content" Value=""/>
        <Setter Property="AutomationProperties.AutomationId" Value="SkipNextButton"/>
    </Style>

    <Style TargetType="local:SkipBackButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Padding" Value="0,-3,0,0"/>
        <Setter Property="Content" Value="⏮"/>
        <Setter Property="AutomationProperties.AutomationId" Value="SkipBackButton"/>
    </Style>

    <Style TargetType="local:SkipAheadButton" BasedOn="{StaticResource MediaPlayerButtonStyle}">
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Padding" Value="0,-3,0,0"/>
        <Setter Property="Content" Value="⏭"/>
        <Setter Property="AutomationProperties.AutomationId" Value="SkipAheadButton"/>
    </Style>

    <Style TargetType="local:TimeElapsedButton" BasedOn="{StaticResource MediaPlayerTextButtonStyle}">
        <Setter Property="AutomationProperties.AutomationId" Value="TimeElapsedButton"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:TimeRemainingButton" BasedOn="{StaticResource MediaPlayerTextButtonStyle}">
        <Setter Property="AutomationProperties.AutomationId" Value="TimeRemainingButton"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:DurationButton" BasedOn="{StaticResource MediaPlayerTextButtonStyle}">
        <Setter Property="AutomationProperties.AutomationId" Value="DurationButton"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:TimeElapsed" BasedOn="{StaticResource MediaPlayerControlStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="AutomationProperties.AutomationId" Value="TimeElapsed"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:TimeRemaining" BasedOn="{StaticResource MediaPlayerControlStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="AutomationProperties.AutomationId" Value="TimeRemaining"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:TotalDuration" BasedOn="{StaticResource MediaPlayerControlStyle}">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="AutomationProperties.AutomationId" Value="TotalDuration"/>
        <Setter Property="MinWidth" Value="70"/>
    </Style>

    <Style TargetType="local:VolumeSlider">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:VolumeSlider">
                    <local:SeekableSlider x:Name="Slider" SmallChange=".05" Orientation="{TemplateBinding Orientation}" Maximum="1" ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:VolumeButton">
        <Setter Property="PanelPosition" Value="-8,-124,-8,8"/>
        <Setter Property="Padding" Value="0,15,0,0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="PanelBackground" Value="{StaticResource AppBarBackgroundThemeBrush}" />
        <Setter Property="AutomationProperties.ItemType" Value="MediaPlayer Button"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:VolumeButton">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="VolumeVisibilityStates">
                                <VisualState x:Name="VolumeRequested">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="VolumeSliderContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VolumeSliderContainer">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="VolumeDismissed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="VolumeSliderContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VolumeSliderContainer">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="VolumeHidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="VolumeSliderContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VolumeSliderContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="VolumeVisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="VolumeSliderContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="VolumeSliderContainer">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <local:MuteButton x:Name="MuteButton" ViewModel="{TemplateBinding ViewModel}" Style="{TemplateBinding MuteButtonStyle}"/>
                        <Grid x:Name="VolumeSliderContainer" VerticalAlignment="Top">
                            <Border Margin="{TemplateBinding PanelPosition}" Background="{TemplateBinding PanelBackground}">
                                <local:VolumeSlider x:Name="VolumeSlider" ViewModel="{TemplateBinding ViewModel}" Width="{StaticResource SliderTrackThemeHeight}" Orientation="Vertical" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:SignalStrength">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Maximum" Value="1"/>
        <Setter Property="FontSize" Value="19"/>
        <Setter Property="Foreground" Value="{StaticResource DefaultTextForegroundThemeBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SignalStrength">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="SignalStrengthStates">
                                <VisualState x:Name="None">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="glyph" Storyboard.TargetProperty="Text">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value=""/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Low">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="glyph" Storyboard.TargetProperty="Text">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value=""/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Medium">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="glyph" Storyboard.TargetProperty="Text">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value=""/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="High">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="glyph" Storyboard.TargetProperty="Text">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value=""/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Full">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="glyph" Storyboard.TargetProperty="Text">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value=""/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <TextBlock x:Name="glyph" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" Text=""/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ResolutionIndicator">
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Foreground" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
        <Setter Property="Background" Value="{StaticResource ToggleButtonForegroundThemeBrush}"/>
        <Setter Property="FontSize" Value="15"/>
        <Setter Property="FontFamily" Value="Arial Black"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Width" Value="30"/>
        <Setter Property="Height" Value="19"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ResolutionIndicator">
                    <Border ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Background="{TemplateBinding Background}" CornerRadius="3">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="MediaQuality">
                                <VisualState x:Name="SD">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighDefinition" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="StandardDefinition" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="HD"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <TextBlock x:Name="HighDefinition" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="HD" Visibility="Visible"/>
                            <TextBlock x:Name="StandardDefinition" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="SD" Visibility="Collapsed"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Button" x:Key="VisualMarkerStyle">
        <Setter Property="Width" Value="25"/>
        <Setter Property="Height" Value="25"/>
        <Setter Property="Padding" Value="11,8,11,8"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid ToolTipService.ToolTip="{TemplateBinding Content}" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Glyph" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Glyph" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Glyph" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Glyph" Margin="{TemplateBinding Padding}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Foreground}"/>
                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:DeselectableListBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DeselectableListBox">
                    <local:ParentAwareListBox x:Name="ListBox" Tag="{TemplateBinding SelectedIdentifierText}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="local:ParentAwareListBoxItem">
                                <Setter Property="Background" Value="Transparent" />
                                <Setter Property="TabNavigation" Value="Local" />
                                <Setter Property="Padding" Value="8,10" />
                                <Setter Property="HorizontalContentAlignment" Value="Left" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="local:ParentAwareListBoxItem">
                                            <Border x:Name="LayoutRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />
                                                        <VisualState x:Name="PointerOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPointerOverBackgroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPointerOverForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIdentifier" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPointerOverForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Background">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPointerOverForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIdentifier" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPointerOverForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation Storyboard.TargetName="PressedBackground" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPressedForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckIdentifier" Storyboard.TargetProperty="Foreground">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxItemPressedForegroundThemeBrush}" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="SelectionStates">
                                                        <VisualState x:Name="Unselected">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="CheckIdentifier"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Selected"/>
                                                        <VisualState x:Name="SelectedUnfocused"/>
                                                        <VisualState x:Name="SelectedDisabled"/>
                                                        <VisualState x:Name="SelectedPointerOver"/>
                                                        <VisualState x:Name="SelectedPressed"/>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                                                <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Grid x:Name="InnerGrid" Background="Transparent">
                                                    <Rectangle x:Name="PressedBackground" Fill="{StaticResource ListBoxItemPressedBackgroundThemeBrush}" Opacity="0" />

                                                    <Grid x:Name="ContentContainer" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" ChildrenTransitions="{TemplateBinding ContentTransitions}">
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto"/>
                                                            <ColumnDefinition Width="*"/>
                                                        </Grid.ColumnDefinitions>
                                                        <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}"/>
                                                        <TextBlock x:Name="CheckIdentifier" Text="{Binding ParentListBox.Tag, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="1"/>
                                                    </Grid>

                                                    <Rectangle x:Name="FocusVisualWhite" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset=".5" />
                                                    <Rectangle x:Name="FocusVisualBlack" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5" />
                                                </Grid>
                                            </Border>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </ListBox.ItemContainerStyle>
                    </local:ParentAwareListBox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:SeekableSlider">
        <Setter Property="IsThumbToolTipEnabled" Value="False" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="{StaticResource SliderTrackBackgroundThemeBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource SliderBorderThemeBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource SliderBorderThemeThickness}" />
        <Setter Property="Foreground" Value="{StaticResource SliderTrackDecreaseBackgroundThemeBrush}" />
        <Setter Property="SliderTrackDecreasePressedBackground" Value="{StaticResource SliderTrackDecreasePressedBackgroundThemeBrush}" />
        <Setter Property="SliderTrackPressedBackground" Value="{StaticResource SliderTrackPressedBackgroundThemeBrush}" />
        <Setter Property="SliderThumbPressedBackground" Value="{StaticResource SliderThumbPressedBackgroundThemeBrush}" />
        <Setter Property="SliderThumbPressedBorder" Value="{StaticResource SliderThumbPressedBorderThemeBrush}" />
        <Setter Property="SliderDisabledBorder" Value="{StaticResource SliderDisabledBorderThemeBrush}" />
        <Setter Property="SliderTrackDecreaseDisabledBackground" Value="{StaticResource SliderTrackDecreaseDisabledBackgroundThemeBrush}" />
        <Setter Property="SliderTrackDisabledBackground" Value="{StaticResource SliderTrackDisabledBackgroundThemeBrush}" />
        <Setter Property="SliderThumbDisabledBackground" Value="{StaticResource SliderThumbDisabledBackgroundThemeBrush}" />
        <Setter Property="SliderTrackDecreasePointerOverBackground" Value="{StaticResource SliderTrackDecreasePointerOverBackgroundThemeBrush}" />
        <Setter Property="SliderTrackPointerOverBackground" Value="{StaticResource SliderTrackPointerOverBackgroundThemeBrush}" />
        <Setter Property="SliderThumbPointerOverBackground" Value="{StaticResource SliderThumbPointerOverBackgroundThemeBrush}" />
        <Setter Property="SliderThumbPointerOverBorder" Value="{StaticResource SliderThumbPointerOverBorderThemeBrush}" />
        <Setter Property="SliderThumbBackground" Value="{StaticResource SliderThumbBackgroundThemeBrush}" />
        <Setter Property="ManipulationMode" Value="None" />
        <Setter Property="SliderThumbStyle">
            <Setter.Value>
                <Style TargetType="Thumb">
                    <Setter Property="BorderThickness" Value="1" />
                    <Setter Property="BorderBrush" Value="{StaticResource SliderThumbBorderThemeBrush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Thumb">
                                <Border Background="{TemplateBinding Background}" Height="{StaticResource SliderTrackThemeHeight}" Width="{StaticResource SliderTrackThemeHeight}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SeekableSlider">
                    <Grid x:Name="LayoutRoot">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreasePressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackPressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPressedBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreasePressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackPressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPressedBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderDisabledBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalBorder" Storyboard.TargetProperty="Stroke">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderDisabledBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreaseDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreaseDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbDisabledBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreasePointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackPointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPointerOverBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalDecreaseRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackDecreasePointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalTrackRect" Storyboard.TargetProperty="Fill">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderTrackPointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPointerOverBackground, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalThumb" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SliderThumbPointerOverBorder, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualWhite" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisualBlack" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid x:Name="HorizontalTemplate">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <ContentPresenter x:Name="HorizontalBackgroundContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding HorizontalBackgroundContent}" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
                            <Rectangle x:Name="HorizontalTrackRect" Margin="{TemplateBinding Padding}" Grid.Row="1" Fill="{TemplateBinding Background}" Grid.Column="0" Grid.ColumnSpan="3" IsHitTestVisible="False" />
                            <Rectangle x:Name="HorizontalDecreaseRect" Margin="{TemplateBinding Padding}" Grid.Row="1" Fill="{TemplateBinding Foreground}" Grid.Column="0" IsHitTestVisible="False"/>
                            <Rectangle x:Name="HorizontalBorder" Margin="{TemplateBinding Padding}" Grid.RowSpan="3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="3" IsHitTestVisible="False" />
                            <Border x:Name="HorizontalAvailableBar" Grid.RowSpan="3" Grid.ColumnSpan="3" HorizontalAlignment="Left" IsHitTestVisible="True" Background="#00000000" />
                            <ContentPresenter x:Name="HorizontalForegroundContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding HorizontalForegroundContent}" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
                            <Thumb x:Name="HorizontalThumb" Background="{TemplateBinding SliderThumbBackground}" Style="{TemplateBinding SliderThumbStyle}" DataContext="{TemplateBinding Value}" Grid.Row="1" Grid.Column="1" />
                        </Grid>

                        <Grid x:Name="VerticalTemplate" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>

                            <ContentPresenter x:Name="VerticalBackgroundContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding VerticalBackgroundContent}" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
                            <Rectangle x:Name="VerticalTrackRect" Margin="{TemplateBinding Padding}" Grid.Column="1" Fill="{TemplateBinding Background}" Grid.Row="0" Grid.RowSpan="3" IsHitTestVisible="False"/>
                            <Rectangle x:Name="VerticalDecreaseRect" Margin="{TemplateBinding Padding}" Grid.Column="1" Fill="{TemplateBinding Foreground}" Grid.Row="2" IsHitTestVisible="False"/>
                            <Rectangle x:Name="VerticalBorder" Margin="{TemplateBinding Padding}" Grid.ColumnSpan="3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" Grid.RowSpan="3" IsHitTestVisible="False"/>
                            <Border x:Name="VerticalAvailableBar" Grid.ColumnSpan="3" Grid.RowSpan="3" VerticalAlignment="Bottom" IsHitTestVisible="True" Background="#00000000" />
                            <ContentPresenter x:Name="VerticalForegroundContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding VerticalForegroundContent}" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
                            <Thumb x:Name="VerticalThumb" Background="{TemplateBinding SliderThumbBackground}" Style="{TemplateBinding SliderThumbStyle}" DataContext="{TemplateBinding Value}" Grid.Row="1" Grid.Column="1" />
                        </Grid>

                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5" Margin="-5"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5" Margin="-5"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:Timeline">
        <Setter Property="Height" Value="{StaticResource SliderTrackThemeHeight}" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Margin" Value="8,0,8,0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Timeline">
                    <Grid ToolTipService.ToolTip="{TemplateBinding AutomationProperties.Name}">
                        <local:SeekableSlider x:Name="ProgressSlider"
                                SmallChange="10"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                VerticalAlignment="Stretch"
                                Orientation="Horizontal"
                                Height="{TemplateBinding Height}"
                                DataContext="{TemplateBinding ViewModel}">
                            <local:SeekableSlider.HorizontalForegroundContent>
                                <local:PositionedItemsControl x:Name="PositionedItemsControl"
                                    ItemsSource="{Binding VisualMarkers}"
                                    Minimum="{Binding StartTime.TotalSeconds}"
                                    Maximum="{Binding EndTime.TotalSeconds}">
                                    <local:PositionedItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <Button IsEnabled="{Binding IsSeekable}"
                                            local:PositionedItemsPanel.Position="{Binding Time.TotalSeconds}"
                                            Content="{Binding Text}">
                                                <Button.Style>
                                                    <Binding Path="Style" ConverterParameter="{StaticResource VisualMarkerStyle}">
                                                        <Binding.Converter>
                                                            <local:TargetNullValueConverter/>
                                                        </Binding.Converter>
                                                    </Binding>
                                                </Button.Style>
                                            </Button>
                                        </DataTemplate>
                                    </local:PositionedItemsControl.ItemTemplate>
                                </local:PositionedItemsControl>
                            </local:SeekableSlider.HorizontalForegroundContent>
                            <local:SeekableSlider.HorizontalBackgroundContent>
                                <ProgressBar x:Name="DownloadProgressBar"
                                     VerticalAlignment="Stretch"
                                     Foreground="{StaticResource SliderTrackBackgroundThemeBrush}"
                                     Background="Transparent"
                                     BorderThickness="0"
                                     Maximum="1"
                                     IsTabStop="False"
                                     BorderBrush="Transparent"
                                     IsIndeterminate="False"
                                     Value="{Binding DownloadProgress}" />
                            </local:SeekableSlider.HorizontalBackgroundContent>
                        </local:SeekableSlider>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ControlPanel">
        <Setter Property="Background" Value="{StaticResource ControlPanelBackgroundThemeBrush}"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Height" Value="42"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ControlPanel">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="MediaStates">
                                <VisualState x:Name="Opening"/>
                                <VisualState x:Name="Paused"/>
                                <VisualState x:Name="Playing"/>
                                <VisualState x:Name="Closed"/>
                                <VisualState x:Name="Buffering"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="LayoutStates">
                                <VisualState x:Name="Compact">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NonEssentialsFarLeft">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NonEssentialsNearLeft">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NonEssentialsNearRight">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NonEssentialsFarRight">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="Border" DataContext="{TemplateBinding ViewModel}" Background="{TemplateBinding Background}">
                            <Border.Resources>
                                <local:BoolToVisibilityConverter x:Key="VisibleIfConverter" />
                            </Border.Resources>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                <StackPanel x:Name="LeftItemsPanel" Orientation="Horizontal">
                                    <Grid x:Name="LeftMargin" Width="8"/>
                                    <StackPanel Orientation="Horizontal" x:Name="NonEssentialsFarLeft">
                                        <local:ReplayButton x:Name="ReplayButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsReplayButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SkipPreviousButton x:Name="SkipPreviousButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipPreviousButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:RewindButton x:Name="RewindButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsRewindButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SkipBackButton x:Name="SkipBackButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    </StackPanel>

                                    <local:PlayPauseButton x:Name="PlayPauseButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsPlayPauseButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <StackPanel Orientation="Horizontal" x:Name="NonEssentialsNearLeft">
                                        <local:StopButton x:Name="StopButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsStopButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SkipAheadButton x:Name="SkipAheadButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipAheadButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:FastForwardButton x:Name="FastForwardButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsFastForwardButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SlowMotionButton x:Name="SlowMotionButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSlowMotionButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SkipNextButton x:Name="SkipNextButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsSkipNextButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    </StackPanel>
                                    <local:TimeElapsedButton x:Name="TimeElapsedButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimeElapsedButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                </StackPanel>

                                <local:Timeline x:Name="Timeline" Grid.Column="1" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimelineVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>

                                <StackPanel x:Name="RightItemsPanel" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Left">
                                    <local:TimeRemainingButton x:Name="TimeRemainingButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsTimeRemainingButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <local:DurationButton x:Name="DurationButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsDurationButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <StackPanel Orientation="Horizontal" x:Name="NonEssentialsNearRight">
                                        <local:CaptionSelectionButton x:Name="CaptionSelectionButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsCaptionSelectionButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:AudioSelectionButton x:Name="AudioSelectionButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsAudioSelectionButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    </StackPanel>
                                    <local:VolumeButton x:Name="VolumeButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsVolumeButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0" PanelBackground="{TemplateBinding Background}"/>
                                    <local:MuteButton x:Name="MuteButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsMuteButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <local:VolumeSlider x:Name="VolumeSlider" ViewModel="{TemplateBinding ViewModel}" Orientation="Horizontal" VerticalAlignment="Center" Width="83" Visibility="{Binding IsVolumeSliderVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <local:FullScreenButton x:Name="FullScreenButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsFullScreenButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                    <StackPanel Orientation="Horizontal" x:Name="NonEssentialsFarRight">
                                        <local:GoLiveButton x:Name="GoLiveButton" ViewModel="{TemplateBinding ViewModel}" Visibility="{Binding IsGoLiveButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}" Margin="8,0,8,0"/>
                                        <local:SignalStrength x:Name="SignalStrength" Value="{Binding SignalStrength}" Margin="4,0,0,0" VerticalAlignment="Center" Visibility="{Binding IsSignalStrengthVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}"/>
                                        <local:ResolutionIndicator x:Name="ResolutionIndicator" MediaQuality="{Binding MediaQuality}" VerticalAlignment="Center" Margin="4,0,4,0" Visibility="{Binding IsResolutionIndicatorVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource VisibleIfConverter}}"/>
                                    </StackPanel>
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:MediaPlayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:MediaPlayer">
                    <Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FullScreenStates">
                                <VisualState x:Name="FullScreen"/>
                                <VisualState x:Name="NotFullScreen"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CaptionsStates">
                                <VisualState x:Name="CaptionsActive">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="CaptionsContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CaptionsInactive">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="CaptionsContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="AdvertisingStates">
                                <VisualState x:Name="LoadingAd">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MediaContainer"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="LoadingAdvertisment">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsIndeterminate" Storyboard.TargetName="AdvertisementLoadingProgressBar">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="LinearAd">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MediaContainer"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NonLinearAd">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MediaContainer"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NoAd">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="MediaContainer"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="PlayToStates">
                                <VisualState x:Name="PlayToConnected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PlayToShield">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PlayToRendering">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PlayToShield">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PlayToDisconnected"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="InteractiveStates">
                                <VisualState x:Name="StartInteracting">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InteractivityContainer">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="StopInteracting">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InteractivityContainer">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Visible">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InteractivityContainer" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InteractivityContainer"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="MediaStates">
                                <VisualState x:Name="Opening">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="BufferingContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Paused"/>
                                <VisualState x:Name="Playing"/>
                                <VisualState x:Name="Closed"/>
                                <VisualState x:Name="Buffering">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="BufferingContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="PlayerStates">
                                <VisualState x:Name="Unloaded"/>
                                <VisualState x:Name="Pending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="LoaderViewContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Loading"/>
                                <VisualState x:Name="Loaded"/>
                                <VisualState x:Name="Opened">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Starting">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Started">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Ending">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="InteractivityContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Failed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="ErrorsContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Retrying">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Visibility)" Storyboard.TargetName="BufferingContainer">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="MediaContainer">
                            <MediaElement x:Name="Media"/>
                            <Grid x:Name="CaptionsContainer" Visibility="Collapsed" IsHitTestVisible="False"/>
                            <Border x:Name="PlayToShield" Background="#485d7a" Visibility="Collapsed"/>
                        </Grid>
                        <Grid x:Name="AdvertisingContainer" Visibility="Collapsed">
                            <Grid x:Name="LoadingAdvertisment" Background="#00000000" Visibility="Collapsed">
                                <ProgressBar x:Name="AdvertisementLoadingProgressBar" IsIndeterminate="False" VerticalAlignment="Center"  HorizontalAlignment="Stretch"/>
                            </Grid>
                        </Grid>
                        <Grid x:Name="ErrorsContainer" Visibility="Collapsed"/>
                        <Grid x:Name="InteractivityContainer" Visibility="Collapsed">
                            <local:ControlPanel x:Name="ControlPanel" ViewModel="{TemplateBinding InteractiveViewModel}"
                                IsGoLiveButtonVisible="{TemplateBinding IsGoLiveVisible}"
                                IsAudioSelectionButtonVisible="{TemplateBinding IsAudioSelectionVisible}"
                                IsCaptionSelectionButtonVisible="{TemplateBinding IsCaptionSelectionVisible}"
                                IsTimeElapsedButtonVisible="{TemplateBinding IsTimeElapsedVisible}"
                                IsDurationButtonVisible="{TemplateBinding IsDurationVisible}"
                                IsTimeRemainingButtonVisible="{TemplateBinding IsTimeRemainingVisible}"
                                IsFastForwardButtonVisible="{TemplateBinding IsFastForwardVisible}"
                                IsStopButtonVisible="{TemplateBinding IsStopVisible}"
                                IsRewindButtonVisible="{TemplateBinding IsRewindVisible}"
                                IsSkipPreviousButtonVisible="{TemplateBinding IsSkipPreviousVisible}"
                                IsSkipNextButtonVisible="{TemplateBinding IsSkipNextVisible}"
                                IsSkipBackButtonVisible="{TemplateBinding IsSkipBackVisible}"
                                IsSkipAheadButtonVisible="{TemplateBinding IsSkipAheadVisible}"
                                IsReplayButtonVisible="{TemplateBinding IsReplayVisible}"
                                IsResolutionIndicatorVisible="{TemplateBinding IsResolutionIndicatorVisible}"
                                IsSignalStrengthVisible="{TemplateBinding IsSignalStrengthVisible}"
                                IsFullScreenButtonVisible="{TemplateBinding IsFullScreenVisible}"
                                IsSlowMotionButtonVisible="{TemplateBinding IsSlowMotionVisible}"
                                IsPlayPauseButtonVisible="{TemplateBinding IsPlayPauseVisible}"
                                IsVolumeButtonVisible="{TemplateBinding IsVolumeVisible}"
                                IsTimelineVisible="{TemplateBinding IsTimelineVisible}"/>
                        </Grid>
                        <Grid x:Name="LoaderViewContainer" Visibility="Collapsed"/>
                        <Grid x:Name="BufferingContainer" Visibility="Collapsed"/>
                        <Grid x:Name="SettingsContainer" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:LoaderView">
        <Setter Property="Background" Value="#00000000"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LoaderView">
                    <Grid Background="{TemplateBinding Background}">
                        <local:MediaPlayerButton x:Name="LoadButton" FontSize="75" Size="140" StrokeThickness="3" VerticalAlignment="Center" HorizontalAlignment="Center" Content=""/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ErrorView">
        <Setter Property="Background" Value="{StaticResource PanelBackgroundThemeBrush}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ErrorView">
                    <Grid Background="{TemplateBinding Background}">
                        <StackPanel VerticalAlignment="Center">
                            <TextBlock Text="{TemplateBinding ErrorText}" Margin="0,0,0,12" FontSize="24" HorizontalAlignment="Center"/>
                            <local:MediaPlayerButton x:Name="RetryButton" FontSize="75" Size="140" StrokeThickness="3" VerticalAlignment="Center" HorizontalAlignment="Center" Content=""/>
                            <TextBlock x:Name="RetryInstructions" Margin="0,12,0,12" FontSize="24" HorizontalAlignment="Center"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:BufferingView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:BufferingView">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="MediaStates">
                                <VisualState x:Name="Opening">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsIndeterminate" Storyboard.TargetName="ProgressIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ProgressIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.01" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Paused"/>
                                <VisualState x:Name="Playing"/>
                                <VisualState x:Name="Closed"/>
                                <VisualState x:Name="Buffering">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsIndeterminate" Storyboard.TargetName="ProgressIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="True"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ProgressIndicator">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.01" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ProgressBar x:Name="ProgressIndicator" IsIndeterminate="False" Visibility="Collapsed" IsHitTestVisible="False"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:CaptionSelectorView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:CaptionSelectorView">
                    <Grid x:Name="LayoutRoot" Background="#00000000">
                        <Border BorderThickness="2" BorderBrush="{StaticResource ListBoxForegroundThemeBrush}" Background="{StaticResource ListBoxFocusBackgroundThemeBrush}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,40">
                            <local:DeselectableListBox x:Name="CaptionsList" MaxWidth="200"  ItemsSource="{Binding AvailableCaptions}" SelectedItem="{Binding SelectedCaption, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <local:DeselectableListBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}"/>
                                    </DataTemplate>
                                </local:DeselectableListBox.ItemTemplate>
                            </local:DeselectableListBox>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:AudioSelectionView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AudioSelectionView">
                    <Grid x:Name="LayoutRoot" Background="#00000000">
                        <Border BorderThickness="2" BorderBrush="{StaticResource ListBoxForegroundThemeBrush}" Background="{StaticResource ListBoxFocusBackgroundThemeBrush}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,40">
                            <ListBox x:Name="AudioList" MaxWidth="200" ItemsSource="{Binding AvailableAudioStreams}" SelectedItem="{Binding SelectedAudioStream, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}"/>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

